Re: [NTG-context] return a labeltext with color...

2022-06-24 Thread Willi Egger via ntg-context
Hans, Wolfgang, I am so happy to receive your immediate answers. — Thanks a lot, the problem is solved and I get the colored labeltext! Thank you Willi > On 24 Jun 2022, at 19:19, Hans Hagen via ntg-context > wrote: > > On 6/24/2022 4:34 PM, Willi Egger via ntg-context wrot

Re: [NTG-context] return a labeltext with color...

2022-06-24 Thread Hans Hagen via ntg-context
On 6/24/2022 4:34 PM, Willi Egger via ntg-context wrote: Hi all, Sorry for bothering you again. I would like that lua is returning a colored string, which is a label-text. The following does not work, the labeltext remains black, there is no error though: return context.color({&quo

Re: [NTG-context] return a labeltext with color...

2022-06-24 Thread Wolfgang Schuster via ntg-context
Willi Egger via ntg-context schrieb am 24.06.2022 um 16:34: Hi all, Sorry for bothering you again. I would like that lua is returning a colored string, which is a label-text. The following does not work, the labeltext remains black, there is no error though: return context.color({&quo

[NTG-context] return a labeltext with color...

2022-06-24 Thread Willi Egger via ntg-context
Hi all, Sorry for bothering you again. I would like that lua is returning a colored string, which is a label-text. The following does not work, the labeltext remains black, there is no error though: return context.color({"red"},context.labeltext(s)) What is the correct approac

Re: [NTG-context] TOC labeltext and no partlabel

2021-08-25 Thread Adam Reviczky via ntg-context
Thank you very much Wolfgang for the explanation, Both solutions make sense now and work great. Regards, Adam On Wed, Aug 25, 2021 at 11:46 AM Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > Adam Reviczky via ntg-context schrieb am 25.08.2021 um 02:02: > > Hi, > > > > I have

Re: [NTG-context] TOC labeltext and no partlabel

2021-08-25 Thread Wolfgang Schuster via ntg-context
Adam Reviczky via ntg-context schrieb am 25.08.2021 um 02:02: Hi, I have asked this question before, but now I cannot get it working again. https://ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-in-toc I want to set partlabels in my TOC but not in the document

[NTG-context] TOC labeltext and no partlabel

2021-08-24 Thread Adam Reviczky via ntg-context
Hi, I have asked this question before, but now I cannot get it working again. https://ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-in-toc I want to set partlabels in my TOC but not in the document itself. The desired output would be: --- Contents Chapter 1 Bodypart

Re: [NTG-context] labeltext via lua

2017-02-17 Thread Andreas Schneider
: \setuplabeltext[en][test=Something] \startluacode context.startsectionlevel{title="\\labeltext[test]"} -- ... context.stopsectionlevel() \stopluacode The title correctly reads "Something", but the bookmark in the PDF viewer shows "test". also

Re: [NTG-context] labeltext via lua

2017-02-16 Thread Hans Hagen
be a crossover between lua and tex, but that results in the bookmark having the wrong label: \setuplabeltext[en][test=Something] \startluacode context.startsectionlevel{title="\\labeltext[test]"} -- ... context.stopsectionlevel() \stopluacode The title correctly reads "Something&quo

Re: [NTG-context] labeltext via lua

2017-02-16 Thread Andreas Schneider
, but that results in the bookmark having the wrong label: \setuplabeltext[en][test=Something] \startluacode context.startsectionlevel{title="\\labeltext[test]"} -- ... context.stopsectionlevel() \stopluacode The title correctly reads "Something", but the bookmark in the PDF viewer shows &qu

Re: [NTG-context] labeltext via lua

2017-02-16 Thread Hans Hagen
On 2/16/2017 2:12 PM, Andreas Schneider wrote: Am 2017-02-16 11:50, schrieb Hans Hagen: languages.data.labels.texts.appendix.labels.en look into lang-txt.lua Hello Hans, I already looked into this and even printed the whole languages.data table at runtime, but didn't find my keys in there.

Re: [NTG-context] labeltext via lua

2017-02-16 Thread Andreas Schneider
Am 2017-02-16 11:50, schrieb Hans Hagen: languages.data.labels.texts.appendix.labels.en look into lang-txt.lua Hello Hans, I already looked into this and even printed the whole languages.data table at runtime, but didn't find my keys in there. Here is an example which apparently doesn't

Re: [NTG-context] labeltext via lua

2017-02-16 Thread Hans Hagen
On 2/16/2017 11:36 AM, Andreas Schneider wrote: Hello, if I define a labeltext via \setuplabeltext[en][test=Something], how can I access that value via lua? (context.labeltext obviously prints the content, but doesn't allow me to use it in lua). languages.data.labels.texts.appendix.labels.en

[NTG-context] labeltext via lua

2017-02-16 Thread Andreas Schneider
Hello, if I define a labeltext via \setuplabeltext[en][test=Something], how can I access that value via lua? (context.labeltext obviously prints the content, but doesn't allow me to use it in lua). As a related side-request: how can I fix expansion in cases like this: \startsectionlevel

Re: [NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-18 Thread Hans Hagen
On 16-6-2012 15:19, Philipp Gesang wrote: Hi Hans! ···date: 2012-06-12, Tuesday···from: Hans Hagen··· On 12-6-2012 16:41, Philipp Gesang wrote: I’ll be collecting candidates for the wiki page until saturday and then write up a draft, maybe submit it to the list for review first. I can draw

Re: [NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-16 Thread Philipp Gesang
Hi Hans! ···date: 2012-06-12, Tuesday···from: Hans Hagen··· On 12-6-2012 16:41, Philipp Gesang wrote: I’ll be collecting candidates for the wiki page until saturday and then write up a draft, maybe submit it to the list for review first. I can draw up a preliminary list first so you can

Re: [NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-12 Thread Wolfgang Schuster
Am 12.06.2012 um 00:22 schrieb Aditya Mahajan: On Mon, 11 Jun 2012, Aditya Mahajan wrote: On Mon, 11 Jun 2012, Philipp Gesang wrote: Dear others, please contribute if you know about further setups whose parameters behave in a non-standard way. As this is quite counterintuitive, I’d like

Re: [NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-12 Thread Marco
On 2012-06-11 Philipp Gesang ges...@stud.uni-heidelberg.de wrote: Dear others, please contribute if you know about further setups whose parameters behave in a non-standard way. Here's another candidate: \usepath http://article.gmane.org/gmane.comp.tex.context/75727 As this is quite

Re: [NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-12 Thread Hans Hagen
On 12-6-2012 13:42, Marco wrote: On 2012-06-11 Philipp Gesang ges...@stud.uni-heidelberg.de wrote: Dear others, please contribute if you know about further setups whose parameters behave in a non-standard way. Here's another candidate: \usepath

Re: [NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-12 Thread Marco
On 2012-06-12 Hans Hagen pra...@wxs.nl wrote: On 12-6-2012 13:42, Marco wrote: On 2012-06-11 Philipp Gesang ges...@stud.uni-heidelberg.de wrote: Dear others, please contribute if you know about further setups whose parameters behave in a non-standard way. Here's another candidate:

Re: [NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-12 Thread Hans Hagen
On 12-6-2012 16:24, Marco wrote: While you're at it, check \usesubpath as well. I didn't test, but assume it has the same issue. uses the same code As this is quite counterintuitive, I’d like to wikify any known exceptions somewhere over here: How about unifying the interface? IMO that

Re: [NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-12 Thread Philipp Gesang
Hi Hans! ···date: 2012-06-12, Tuesday···from: Hans Hagen··· On 12-6-2012 16:24, Marco wrote: While you're at it, check \usesubpath as well. I didn't test, but assume it has the same issue. uses the same code As this is quite counterintuitive, I’d like to wikify any known exceptions

Re: [NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-12 Thread Hans Hagen
On 12-6-2012 16:41, Philipp Gesang wrote: I’ll be collecting candidates for the wiki page until saturday and then write up a draft, maybe submit it to the list for review first. I can draw up a preliminary list first so you can have a look at it. next week is ok Hans

[NTG-context] labeltext assignment

2012-06-11 Thread Philipp Gesang
Hi all, there appears to be something special about how the key-value list works with \setuplabeltext: ··· \setuplabeltext [ foo=bar, %% - comma not allowed here? % foo=bar %% - works ] \starttext \labeltext{foo

Re: [NTG-context] labeltext assignment

2012-06-11 Thread Hans Hagen
%% - works ] \starttext \labeltext{foo} \stoptext ··· Normally the trailing comma causes no trouble, but here it won’t even compile. indeed a slightly different parser is used here

Re: [NTG-context] labeltext assignment

2012-06-11 Thread Philipp Gesang
: ··· \setuplabeltext [ foo=bar, %% - comma not allowed here? % foo=bar %% - works ] \starttext \labeltext{foo} \stoptext ··· Normally the trailing comma causes no trouble, but here it won’t even compile

Re: [NTG-context] labeltext assignment

2012-06-11 Thread Wolfgang Schuster
: ··· \setuplabeltext [ foo=bar, %% - comma not allowed here? % foo=bar %% - works ] \starttext \labeltext{foo} \stoptext ··· Normally the trailing comma causes no trouble

[NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-11 Thread Philipp Gesang
how the key-value list works with \setuplabeltext: ··· \setuplabeltext [ foo=bar, %% - comma not allowed here? % foo=bar %% - works ] \starttext \labeltext{foo} \stoptext

Re: [NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-11 Thread Aditya Mahajan
On Mon, 11 Jun 2012, Philipp Gesang wrote: Dear others, please contribute if you know about further setups whose parameters behave in a non-standard way. As this is quite counterintuitive, I’d like to wikify any known exceptions somewhere over here:

Re: [NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-11 Thread Aditya Mahajan
On Mon, 11 Jun 2012, Aditya Mahajan wrote: On Mon, 11 Jun 2012, Philipp Gesang wrote: Dear others, please contribute if you know about further setups whose parameters behave in a non-standard way. As this is quite counterintuitive, I’d like to wikify any known exceptions somewhere over here:

Re: [NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-11 Thread Philipp Gesang
Hi Aditya! ···date: 2012-06-11, Monday···from: Aditya Mahajan··· On Mon, 11 Jun 2012, Philipp Gesang wrote: Dear others, please contribute if you know about further setups whose parameters behave in a non-standard way. As this is quite counterintuitive, I’d like to wikify any known

Re: [NTG-context] Exceptions to assignment syntax [was: Re: labeltext assignment]

2012-06-11 Thread Philipp Gesang
Hi Aditya! ···date: 2012-06-11, Monday···from: Aditya Mahajan··· On Mon, 11 Jun 2012, Aditya Mahajan wrote: On Mon, 11 Jun 2012, Philipp Gesang wrote: Other potential topics that fit better on such a page: * Why is space after \externalfigure[..][..] gobbled? (in the FAQ) * Why does

Re: [NTG-context] How do I test for empty labeltext?

2011-10-25 Thread Mojca Miklavec
On Mon, Oct 24, 2011 at 20:41, Hans Hagen pra...@wxs.nl wrote: On 24-10-2011 19:41, Mojca Miklavec wrote: Hello, The following code \setuplabeltext[test=] test is \doifemptyelse{\labeltext{test}}{empty}{not empty} doesn't work as intended for the reasons that I approximately understand

Re: [NTG-context] How do I test for empty labeltext?

2011-10-25 Thread Hans Hagen
On 25-10-2011 11:26, Mojca Miklavec wrote: On Mon, Oct 24, 2011 at 20:41, Hans Hagenpra...@wxs.nl wrote: On 24-10-2011 19:41, Mojca Miklavec wrote: Hello, The following code \setuplabeltext[test=] test is \doifemptyelse{\labeltext{test}}{empty}{not empty} doesn't work as intended

Re: [NTG-context] How do I test for empty labeltext?

2011-10-25 Thread Aditya Mahajan
On Tue, 25 Oct 2011, Mojca Miklavec wrote: you can try \doiftextelse instead Thank you very much. This works fine. This should probably be added to http://wiki.contextgarden.net/System_Macros/Branches_and_Decisions at least (possibly to reference next to labels as well), but I'm not sure

[NTG-context] How do I test for empty labeltext?

2011-10-24 Thread Mojca Miklavec
Hello, The following code \setuplabeltext[test=] test is \doifemptyelse{\labeltext{test}}{empty}{not empty} doesn't work as intended for the reasons that I approximately understand (not exactly, but I understand that there might be a lot of weird stuff returned when I ask for labeltext

Re: [NTG-context] How do I test for empty labeltext?

2011-10-24 Thread Hans Hagen
On 24-10-2011 19:41, Mojca Miklavec wrote: Hello, The following code \setuplabeltext[test=] test is \doifemptyelse{\labeltext{test}}{empty}{not empty} doesn't work as intended for the reasons that I approximately understand (not exactly, but I understand that there might be a lot of weird